package org.ushio.nchu_22201404.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.ushio.nchu_22201404.dao.MaintainRecordDao;
import org.ushio.common_module.entity.RepairRecord;
import org.ushio.nchu_22201404.service.impl.MaintainRecordServiceImpl;

import java.util.List;

@Service
public class MaintainRecordService implements MaintainRecordServiceImpl {
    @Autowired
    private MaintainRecordDao maintainRecordDao;

    @Override
    public void maintainInsert(RepairRecord repairRecord) {
        maintainRecordDao.insertMaintainRecord(repairRecord);
    }

    @Override
    public void maintainSetIssueResolved(RepairRecord repairRecord) {
        maintainRecordDao.maintainSetIssueResolved(repairRecord);
    }

    @Override
    public RepairRecord maintainGetIssueResolved(String phoneNumber) {
        return maintainRecordDao.maintainGetIssueResolved(phoneNumber);
    }

    @Override
    public void maintainSetIsSigned(RepairRecord repairRecord) {
        maintainRecordDao.maintainSetIsSigned(repairRecord);
    }

    @Override
    public RepairRecord maintainGetIsSigned(String phoneNumber) {
        return maintainRecordDao.maintainGetIsSigned(phoneNumber);
    }

    @Override
    public List<RepairRecord> maintainSelectToCustomerService() {
        return maintainRecordDao.selectMaintainRecordToCustomerService();
    }

    @Override
    public List<RepairRecord> maintainSelectToAdmin() {
        return maintainRecordDao.selectMaintainRecordToAdmin();
    }

    @Override
    public List<RepairRecord> maintainSelectByPhoneNumber(String phoneNumber) {
        return maintainRecordDao.selectByPhoneNumber(phoneNumber);
    }
}
